import request from '@/http/request'

// 活动列表
export const $getProxyList = (params:any) => {
  return request.request({
    url: '/api/proxys',
    method: 'get',
    params: params
  })
}
// 活动列表
export const $activityList = (params:any) => {
  return request.request({
    url: '/api/activity',
    method: 'get',
    params: params
  })
}
// 删除活动
export const $activityDelete = (activityId, activityTemplateNo) => {
  return request.request({
    url: '/api/activity',
    method: 'DELETE',
    data: { activityId, activityTemplateNo }
  })
}
// 获取小程序列表接口
export const $apiAgentAppList = (data:any) => {
  return request.request({
    url: '/api/agent/app/list',
    method: 'post',
    data: data
  })
}


// 撤回审核
export const $withdrawReview = (activityId:any) => {
  return request.request({
    url: '/api/auditRecords/revoke',
    method: 'post',
    data:  activityId 
  })
}

// 根据活动查询活动奖品
export const $getActivityAwardList = (activityId:any) => {
  return request.request({
    url: '/api/activity/activityAwardList',
    method: 'POST',
    data: { activityId }
  })
}

// 根据奖品ID查询奖品领用详情信息 data: { awardId, awardType, pageNum, pageSize .... }
export const $getActivityAwardDetail = (data) => {
  return request.request({
    url: '/api/activity/activityAwardDetail',
    method: 'POST',
    data
  })
}

// 导出单个奖品数据
export const $exportSingleAwardData = (data) => {
  return request.request({
    url: '/api/board/exportActivityAward',
    method: 'POST',
    data
  })
}

// 导出所有奖品数据
export const $exportAllAwardData = (data) => {
  return request.request({
    url: '/api/exportExcel/exportActivityAward',
    method: 'POST',
    data
  })
}

// 统计看板---客户参与统计表查询
export const $getCustomerData = (params:any) => {
  return request.request({
    url: '/api/activity/acte017/getFansRecord',
    method: 'get',
    params: params
  })
}

// 统计看板---客户参与统计表导出
export const $exportCustomerData = (params:any) => {
  return request.request({
    url: '/api/activity/acte017/exportFansRecord',
    method: 'post',
    data: params,
  })
}